From c5c3a771e5f9a8844e69b62f1dd20757f5af609a Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 17 Dec 2015 16:21:57 +0100 Subject: [PATCH] Remove `Base.handle*Replace()` These methods dealt with opening up a sketch inside an existing editor window, but they were unused - all sketches open in a new window now. --- app/src/processing/app/Base.java | 40 -------------------------------- 1 file changed, 40 deletions(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 0b403f427..5bf085319 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -755,46 +755,6 @@ public class Base { } - /** - * Replace the sketch in the current window with a new untitled document. - */ - public void handleNewReplace() { - if (!activeEditor.checkModified()) { - return; // sketch was modified, and user canceled - } - - // Actually replace things - handleNewReplaceImpl(); - } - - - protected void handleNewReplaceImpl() { - try { - File file = createNewUntitled(); - if (file != null) { - activeEditor.handleOpenInternal(file); - activeEditor.untitled = true; - } - - } catch (IOException e) { - activeEditor.statusError(e); - } - } - - - public void handleOpenReplace(File file) { - if (!activeEditor.checkModified()) { - return; // sketch was modified, and user canceled - } - - boolean loaded = activeEditor.handleOpenInternal(file); - if (!loaded) { - // replace the document without checking if that's ok - handleNewReplaceImpl(); - } - } - - /** * Prompt for a sketch to open, and open it in a new window. *