MCPcopy Index your code
hub / github.com/benfry/processing4 / loadLanguage

Method loadLanguage

app/src/processing/app/Language.java:137–153  ·  view source on GitHub ↗

Read the saved language

()

Source from the content-addressed store, hash-verified

135
136 /** Read the saved language */
137 static private String loadLanguage() {
138 try {
139 if (prefFile.exists()) {
140 String[] lines = PApplet.loadStrings(prefFile);
141 if (lines != null && lines.length > 0) {
142 String language = lines[0].trim();
143 if (language.length() != 0) {
144 return language;
145 }
146 }
147 System.err.println("Using default language because of a problem while reading " + prefFile);
148 }
149 } catch (Exception e) {
150 e.printStackTrace();
151 }
152 return null;
153 }
154
155
156 /**

Callers 1

LanguageMethod · 0.95

Calls 4

loadStringsMethod · 0.95
trimMethod · 0.45
printlnMethod · 0.45
printStackTraceMethod · 0.45

Tested by

no test coverage detected