Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ public class RhubarbManager implements IAudioProcessingLambda {

public void processRaw(File f, String ttsLocation) throws Exception {
String os = OSUtil.isLinux() ? "Linux" : OSUtil.isOSX() ? "macOS" : "Windows";
String exeExtention = OSUtil.isWindows() ? ".exe" : "";
String exeExtension = OSUtil.isWindows() ? ".exe" : "";
File exe = new File(ScriptingEngine.getWorkspace().getAbsolutePath() + "/Rhubarb-Lip-Sync/Rhubarb-Lip-Sync-"
+ RhubarbVersion + "-" + os + "/rhubarb" + exeExtention);
+ RhubarbVersion + "-" + os + "/rhubarb" + exeExtension);
timeCodedVisemes = new ArrayList<>();
if (!exe.exists()) {
com.neuronrobotics.sdk.common.Log.error("Downloading " + exe.getAbsolutePath());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public static String getARDUINOExec() {


@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
// Auto-generated method stub
return new ArrayList<>(Arrays.asList( ".ino",".c", ".h", ".cpp", ".hpp"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public String getShellType() {
}

@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
if (OSUtil.isWindows())
return new ArrayList<>();
return new ArrayList<>(Arrays.asList(".sh", ".bash"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public String getShellType() {
}

@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
ArrayList<String> ext = new ArrayList<>();
ext.add("blend");
return ext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public String getShellType() {
}

@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
ArrayList<String> ext = new ArrayList<>();
ext.add("py");
ext.add("build123d");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public String getDefaultContents() {
}

@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
return new ArrayList<>(Arrays.asList("doodle","cadoodle"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public String getDefaultContents() {
}

@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
// Auto-generated method stub
return new ArrayList<>(Arrays.asList("clj", "cljs", "cljc"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public String getDefaultContents() {
return "";
}
@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
// Auto-generated method stub
return new ArrayList<>(Arrays.asList("fxml","FXML","FxML"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public String getShellType() {
}

@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
ArrayList<String> ext = new ArrayList<>();
ext.add("FCStd");
return ext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public boolean getIsTextFile() {
}

@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
// Auto-generated method stub
return new ArrayList<>(Arrays.asList("groovy", "java"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public interface IExternalEditor {

Class getSupportedLangauge();

default boolean isSupportedByExtention(File file) {
default boolean isSupportedByExtension(File file) {
if(getSupportedLangauge()!=null)
if (getSupportedLangauge().isInstance(ScriptingEngine.getLangaugeByExtention(file.getAbsolutePath()))) {
if (getSupportedLangauge().isInstance(ScriptingEngine.getLangaugeByExtension(file.getAbsolutePath()))) {
return true;
}
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ public interface IScriptingLanguage {
public abstract String getShellType();

/**
* Returns the list of supported file extentions Convention is to provide just
* the leters that make up the file extention
* Returns the list of supported file extensions Convention is to provide just
* the leters that make up the file extension
*/
public abstract ArrayList<String> getFileExtenetion();
public abstract ArrayList<String> getFileExtension();

/**
* This function should return true is the filename provided is of a supported
Expand All @@ -63,7 +63,7 @@ public interface IScriptingLanguage {
* @return true if the file extension is supported, false otherwise.
*/
default boolean isSupportedFileExtenetion(String filename) {
for (String s : getFileExtenetion()) {
for (String s : getFileExtension()) {
if (filename.toLowerCase().endsWith(s.toLowerCase())) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public String getDefaultContents() {
}

@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
// Auto-generated method stub
return new ArrayList<>(Arrays.asList("json"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public boolean getIsTextFile() {
}

@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
// Auto-generated method stub
return new ArrayList<>(Arrays.asList( "jy"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
// }
//
// @Override
// public ArrayList<String> getFileExtenetion() {
// public ArrayList<String> getFileExtension() {
// return new ArrayList<>(Arrays.asList("kt", "kts"));
// }
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public String getDefaultContents() {
return null;
}
@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
// Auto-generated method stub
return new ArrayList<>(Arrays.asList("obj","OBJ","Obj"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public String getShellType() {
}

@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
ArrayList<String> ext = new ArrayList<>();
ext.add("scad");
ext.add("SCad");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void getDefaultContents(String gitURL, String slug) {
}

@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
// Auto-generated method stub
return new ArrayList<>(Arrays.asList("xml"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2241,11 +2241,11 @@ public static List<String> getAllLangauges() {
return langs;
}

public static List<String> getAllExtentions() {
public static List<String> getAllExtensions() {
ArrayList<String> langs = new ArrayList<>();
for (String L : getLangaugesMap().keySet()) {
IScriptingLanguage lang = getLangaugesMap().get(L);
for (String s : lang.getFileExtenetion()) {
for (String s : lang.getFileExtension()) {
langs.add(s);
}
}
Expand All @@ -2256,9 +2256,9 @@ public static HashMap<String, IScriptingLanguage> getLangaugesMap() {
return langauges;
}

public static IScriptingLanguage getLangaugeByExtention(String extention) {
public static IScriptingLanguage getLangaugeByExtension(String extension) {
for (String L : getLangaugesMap().keySet()) {
if (langauges.get(L).isSupportedFileExtenetion(extention)) {
if (langauges.get(L).isSupportedFileExtenetion(extension)) {
return langauges.get(L);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public String getDefaultContents() {
}

@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
// Auto-generated method stub
return new ArrayList<>(Arrays.asList("sequence"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public String getDefaultContents() {
return null;
}
@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
// Auto-generated method stub
return new ArrayList<>(Arrays.asList("stl","STL","Stl"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public String getShellType() {
}

@Override
public ArrayList<String> getFileExtenetion() {
public ArrayList<String> getFileExtension() {
return new ArrayList<>(Arrays.asList("SVG","svg"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class AddFromFile extends AbstractAddFrom {

public AddFromFile set(File source, CaDoodleFile cf) {
setCaDoodleFile(cf);
for (String s : ScriptingEngine.getAllExtentions()) {
for (String s : ScriptingEngine.getAllExtensions()) {
if (source.getName().toLowerCase().endsWith(s.toLowerCase())) {
toLocal(source, getName(),cf);
try {
Expand All @@ -56,7 +56,7 @@ public AddFromFile set(File source, CaDoodleFile cf) {
return this;
}
}
throw new RuntimeException("File Extention not supported: " + source.getName());
throw new RuntimeException("File Extension not supported: " + source.getName());
}

@Override
Expand Down Expand Up @@ -316,7 +316,7 @@ public static File getFile(String name,CaDoodleFile cf) {
}
}
} else {
for (String s : ScriptingEngine.getAllExtentions()) {
for (String s : ScriptingEngine.getAllExtensions()) {
if (f.getName().toLowerCase().endsWith(s.toLowerCase())) {
if(s.toLowerCase().contains("stl")){
stl=f;// return the stl if no blender file exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class Sweep extends AbstractAddFrom {

public Sweep set(File source, CaDoodleFile cf) throws Exception {
if (!source.getName().toLowerCase().endsWith(".svg"))
throw new Exception("Sweep can only take files with the .svg extention");
throw new Exception("Sweep can only take files with the .svg extension");
com.neuronrobotics.sdk.common.Log.debug("Saving Local Copy of " + source.getAbsolutePath());
AddFromFile.toLocal(source, getName(), cf);
setCaDoodleFile(cf);
Expand Down