MCPcopy Index your code
hub / github.com/processing/processing / readSettings

Method readSettings

app/src/processing/app/Util.java:75–86  ·  view source on GitHub ↗

Read from a file with a bunch of attribute/value pairs that are separated by = and ignore comments with #. Changed in 3.x to return null (rather than empty hash) if no file, and changed return type to StringDict instead of Map or HashMap.

(File inputFile)

Source from the content-addressed store, hash-verified

73 * and changed return type to StringDict instead of Map or HashMap.
74 */
75 static public StringDict readSettings(File inputFile) {
76 if (!inputFile.exists()) {
77 Messages.loge(inputFile + " does not exist inside readSettings()");
78 return null;
79 }
80 String lines[] = PApplet.loadStrings(inputFile);
81 if (lines == null) {
82 System.err.println("Could not read " + inputFile);
83 return null;
84 }
85 return readSettings(inputFile.toString(), lines);
86 }
87
88
89 /**

Callers 7

handleMethod · 0.95
updateFlaggedMethod · 0.95
loadPropertiesMethod · 0.95
writePropertiesFileMethod · 0.95
LocalContributionMethod · 0.95
parseContribListMethod · 0.95

Calls 6

logeMethod · 0.95
loadStringsMethod · 0.95
setMethod · 0.95
printlnMethod · 0.45
toStringMethod · 0.45
trimMethod · 0.45

Tested by

no test coverage detected