File tree Expand file tree Collapse file tree 2 files changed +3
-19
lines changed
arduino-core/src/processing/app Expand file tree Collapse file tree 2 files changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -800,9 +800,10 @@ public void importLibrary(UserLibrary lib) throws IOException {
800
800
// import statements into the main sketch file (code[0])
801
801
// if the current code is a .java file, insert into current
802
802
//if (current.flavor == PDE) {
803
- if (hasDefaultExtension (editor .getCurrentTab ().getSketchCode ())) {
803
+ SketchCode code = editor .getCurrentTab ().getSketchCode ();
804
+ if (code .isExtension (Sketch .SKETCH_EXTENSIONS ))
804
805
editor .selectTab (0 );
805
- }
806
+
806
807
// could also scan the text in the file to see if each import
807
808
// statement is already in there, but if the user has the import
808
809
// commented out, then this will be a problem.
@@ -1043,16 +1044,6 @@ private boolean sketchFilesAreReadOnly() {
1043
1044
1044
1045
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1045
1046
1046
- // Breaking out extension types in order to clean up the code, and make it
1047
- // easier for other environments (like Arduino) to incorporate changes.
1048
-
1049
- /**
1050
- * True if the specified code has the default file extension.
1051
- */
1052
- private boolean hasDefaultExtension (SketchCode code ) {
1053
- return code .isExtension (sketch .getDefaultExtension ());
1054
- }
1055
-
1056
1047
/**
1057
1048
* Create the data folder if it does not exist already. As a convenience,
1058
1049
* it also returns the data folder, since it's likely about to be used.
Original file line number Diff line number Diff line change @@ -155,13 +155,6 @@ public SketchCode[] getCodes() {
155
155
return codes .toArray (new SketchCode [0 ]);
156
156
}
157
157
158
- /**
159
- * Returns the default extension for this editor setup.
160
- */
161
- public String getDefaultExtension () {
162
- return "ino" ;
163
- }
164
-
165
158
/**
166
159
* Returns a file object for the primary .pde of this sketch.
167
160
*/
You can’t perform that action at this time.
0 commit comments