From eba1098efbf1ca74086930310c0ce921536bcf36 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Wed, 16 Dec 2015 17:22:23 +0100 Subject: [PATCH] Delete `Sketch.prepare()` The only remaining thing that the method did was call `ensureExistence()`. However, a call the `prepare()` was always followed by a call to `build()`, which already calls `ensureExistence()`, so `prepare()` didn't have any remaining value. --- app/src/processing/app/Editor.java | 1 - app/src/processing/app/Sketch.java | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index dfe789ad5..35755bc0b 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -1762,7 +1762,6 @@ public class Editor extends JFrame implements RunnerListener { public void run() { try { removeAllLineHighlights(); - sketch.prepare(); sketch.build(verbose, saveHex); statusNotice(tr("Done compiling.")); } catch (PreferencesMapException e) { diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java index 20e6265ed..6f88292d1 100644 --- a/app/src/processing/app/Sketch.java +++ b/app/src/processing/app/Sketch.java @@ -872,15 +872,6 @@ public class Sketch { */ //protected String compile() throws RunnerException { - /** - * When running from the editor, take care of preparations before running - * the build. - */ - public void prepare() throws IOException { - // make sure the user didn't hide the sketch folder - ensureExistence(); - } - /** * Run the build inside the temporary build folder. * @return null if compilation failed, main class name if not @@ -948,8 +939,6 @@ public class Sketch { private boolean exportApplet(String appletPath, boolean usingProgrammer) throws Exception { - prepare(); - // build the sketch editor.status.progressNotice(tr("Compiling sketch...")); String foundName = build(appletPath, false, false);