diff --git a/app/src/processing/app/SketchController.java b/app/src/processing/app/SketchController.java index 902c9e333..34958886a 100644 --- a/app/src/processing/app/SketchController.java +++ b/app/src/processing/app/SketchController.java @@ -800,9 +800,10 @@ public class SketchController { // import statements into the main sketch file (code[0]) // if the current code is a .java file, insert into current //if (current.flavor == PDE) { - if (hasDefaultExtension(editor.getCurrentTab().getSketchCode())) { + SketchCode code = editor.getCurrentTab().getSketchCode(); + if (code.isExtension(Sketch.SKETCH_EXTENSIONS)) editor.selectTab(0); - } + // could also scan the text in the file to see if each import // statement is already in there, but if the user has the import // commented out, then this will be a problem. @@ -1043,16 +1044,6 @@ public class SketchController { // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . - // Breaking out extension types in order to clean up the code, and make it - // easier for other environments (like Arduino) to incorporate changes. - - /** - * True if the specified code has the default file extension. - */ - private boolean hasDefaultExtension(SketchCode code) { - return code.isExtension(sketch.getDefaultExtension()); - } - /** * Create the data folder if it does not exist already. As a convenience, * it also returns the data folder, since it's likely about to be used. diff --git a/arduino-core/src/processing/app/Sketch.java b/arduino-core/src/processing/app/Sketch.java index a598841ab..fd312b7a0 100644 --- a/arduino-core/src/processing/app/Sketch.java +++ b/arduino-core/src/processing/app/Sketch.java @@ -155,13 +155,6 @@ public class Sketch { return codes.toArray(new SketchCode[0]); } - /** - * Returns the default extension for this editor setup. - */ - public String getDefaultExtension() { - return "ino"; - } - /** * Returns a file object for the primary .pde of this sketch. */