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

Method handleExport

app/src/processing/app/Editor.java:2026–2040  ·  view source on GitHub ↗

Handles calling the export() function on sketch, and queues all the gui status stuff that comes along with it. Made synchronized to (hopefully) avoid problems of people hitting export twice, quickly, and horking things up.

(final boolean usingProgrammer)

Source from the content-addressed store, hash-verified

2024 * hitting export twice, quickly, and horking things up.
2025 */
2026 synchronized public void handleExport(final boolean usingProgrammer) {
2027 if (PreferencesData.getBoolean("editor.save_on_verify")) {
2028 if (sketch.isModified() && !sketchController.isReadOnly()) {
2029 handleSave(true);
2030 }
2031 }
2032 toolbar.activateExport();
2033 console.clear();
2034 status.progress(tr("Uploading to I/O Board..."));
2035
2036 avoidMultipleOperations = true;
2037
2038 new Thread(timeoutUploadHandler).start();
2039 new Thread(usingProgrammer ? uploadUsingProgrammerHandler : uploadHandler).start();
2040 }
2041
2042 class UploadHandler implements Runnable {
2043 boolean usingProgrammer = false;

Callers 2

buildSketchMenuMethod · 0.95

Calls 9

getBooleanMethod · 0.95
handleSaveMethod · 0.95
isReadOnlyMethod · 0.80
activateExportMethod · 0.80
trMethod · 0.80
isModifiedMethod · 0.65
progressMethod · 0.65
startMethod · 0.65
clearMethod · 0.45

Tested by

no test coverage detected