@@ -425,7 +425,7 @@ protected void nameCode(String newName) {
425
425
if (renamingCode && currentIndex == 0 ) {
426
426
for (int i = 1 ; i < codeCount ; i ++) {
427
427
if (sanitaryName .equalsIgnoreCase (code [i ].getPrettyName ()) &&
428
- code [i ].getExtension (). equalsIgnoreCase ("cpp" )) {
428
+ code [i ].isExtension ("cpp" )) {
429
429
Base .showMessage (_ ("Nope" ),
430
430
I18n .format (
431
431
_ ("You can't rename the sketch to \" {0}\" \n " +
@@ -836,7 +836,7 @@ protected boolean saveAs() throws IOException {
836
836
// resaved (with the same name) to another location/folder.
837
837
for (int i = 1 ; i < codeCount ; i ++) {
838
838
if (newName .equalsIgnoreCase (code [i ].getPrettyName ()) &&
839
- code [i ].getExtension (). equalsIgnoreCase ("cpp" )) {
839
+ code [i ].isExtension ("cpp" )) {
840
840
Base .showMessage (_ ("Nope" ),
841
841
I18n .format (
842
842
_ ("You can't save the sketch as \" {0}\" \n " +
@@ -1819,21 +1819,11 @@ public boolean isReadOnly() {
1819
1819
// Breaking out extension types in order to clean up the code, and make it
1820
1820
// easier for other environments (like Arduino) to incorporate changes.
1821
1821
1822
-
1823
- /**
1824
- * True if the specified extension should be hidden when shown on a tab.
1825
- * For Processing, this is true for .pde files. (Broken out for subclasses.)
1826
- */
1827
- public boolean hideExtension (String what ) {
1828
- return getHiddenExtensions ().contains (what );
1829
- }
1830
-
1831
-
1832
1822
/**
1833
1823
* True if the specified code has the default file extension.
1834
1824
*/
1835
1825
public boolean hasDefaultExtension (SketchCode code ) {
1836
- return code .getExtension (). equals (getDefaultExtension ());
1826
+ return code .isExtension (getDefaultExtension ());
1837
1827
}
1838
1828
1839
1829
0 commit comments