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

Method updateNameProperties

app/src/processing/app/Sketch.java:1329–1352  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1327
1328
1329 private void updateNameProperties() {
1330 // If the main file and the sketch name are not identical,
1331 // update sketch.properties.
1332 String mainName = mainFile.getName();
1333 String defaultName = name + "." + mode.getDefaultExtension();
1334 //System.out.println("main name is " + mainName + " and default name is " + defaultName);
1335
1336 try {
1337 // Read the old sketch.properties file if it already exists
1338 Settings props = loadProperties(folder);
1339
1340 if (mainName.equals(defaultName)) {
1341 props.remove("main");
1342 } else {
1343 props.set("main", mainName);
1344 }
1345 //System.out.println("props size is now " + props.getMap().size());
1346 props.reckon();
1347
1348 } catch (IOException e) {
1349 System.err.println("Error while updating sketch.properties");
1350 e.printStackTrace();
1351 }
1352 }
1353
1354
1355 /**

Callers 2

nameCodeMethod · 0.95
updateInternalMethod · 0.95

Calls 9

loadPropertiesMethod · 0.95
removeMethod · 0.95
setMethod · 0.95
reckonMethod · 0.95
getNameMethod · 0.45
getDefaultExtensionMethod · 0.45
equalsMethod · 0.45
printlnMethod · 0.45
printStackTraceMethod · 0.45

Tested by

no test coverage detected