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

Method updateInternal

app/src/processing/app/Sketch.java:1196–1225  ·  view source on GitHub ↗

Update internal state for new sketch name or folder location.

(String sketchName, File sketchFolder,
                                boolean renaming)

Source from the content-addressed store, hash-verified

1194 * Update internal state for new sketch name or folder location.
1195 */
1196 protected void updateInternal(String sketchName, File sketchFolder,
1197 boolean renaming) {
1198 // reset all the state information for the sketch object
1199 String oldPath = getMainFilePath();
1200 primaryFile = code[0].getFile();
1201// String newPath = getMainFilePath();
1202// editor.base.renameRecent(oldPath, newPath);
1203
1204 name = sketchName;
1205 folder = sketchFolder;
1206 disappearedWarning = false;
1207 codeFolder = new File(folder, "code");
1208 dataFolder = new File(folder, "data");
1209
1210 // set the main file to be the current tab
1211 //setCurrentCode(0);
1212 // nah, this might just annoy people
1213
1214 // Name changed, rebuild the sketch menus
1215 calcModified();
1216// System.out.println("modified is now " + modified);
1217 editor.updateTitle();
1218 editor.getBase().rebuildSketchbookMenus();
1219 if (renaming) {
1220 // only update the Recent menu if it's a rename, not a Save As
1221 // https://github.com/processing/processing/issues/5902
1222 Recent.rename(editor, oldPath);
1223 }
1224// editor.header.rebuild();
1225 }
1226
1227
1228 /**

Callers 2

nameCodeMethod · 0.95
saveAsMethod · 0.95

Calls 7

getMainFilePathMethod · 0.95
calcModifiedMethod · 0.95
renameMethod · 0.95
getFileMethod · 0.80
updateTitleMethod · 0.80
getBaseMethod · 0.45

Tested by

no test coverage detected