1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-03-13 10:29:35 +01:00

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.
This commit is contained in:
Matthijs Kooijman 2015-12-17 16:21:57 +01:00 committed by Martino Facchin
parent 7d277b359c
commit c5c3a771e5

View File

@ -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.
*