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 @@ -801,9 +801,10 @@ private void importLibrary(File jarPath) throws IOException {
801
801
// import statements into the main sketch file (code[0])
802
802
// if the current code is a .java file, insert into current
803
803
//if (current.flavor == PDE) {
804
- if (hasDefaultExtension (editor .getCurrentTab ().getSketchCode ())) {
804
+ SketchCode code = editor .getCurrentTab ().getSketchCode ();
805
+ if (code .isExtension (Sketch .SKETCH_EXTENSIONS ))
805
806
editor .selectTab (0 );
806
- }
807
+
807
808
// could also scan the text in the file to see if each import
808
809
// statement is already in there, but if the user has the import
809
810
// commented out, then this will be a problem.
@@ -1035,16 +1036,6 @@ private boolean sketchFilesAreReadOnly() {
1035
1036
1036
1037
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1037
1038
1038
- // Breaking out extension types in order to clean up the code, and make it
1039
- // easier for other environments (like Arduino) to incorporate changes.
1040
-
1041
- /**
1042
- * True if the specified code has the default file extension.
1043
- */
1044
- private boolean hasDefaultExtension (SketchCode code ) {
1045
- return code .isExtension (sketch .getDefaultExtension ());
1046
- }
1047
-
1048
1039
/**
1049
1040
* Create the data folder if it does not exist already. As a convenience,
1050
1041
* 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