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

Method loadSavedCode

java/src/processing/mode/java/JavaEditor.java:1967–1979  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1965
1966
1967 private void loadSavedCode() {
1968 //SketchCode[] code = sketch.getCode();
1969 for (SketchCode code : sketch.getCode()) {
1970 if (!code.getProgram().equals(code.getSavedProgram())) {
1971 code.setProgram(code.getSavedProgram());
1972 /* Wild Hack: set document to null so the text editor will refresh
1973 the program contents when the document tab is being clicked */
1974 code.setDocument(null);
1975 }
1976 }
1977 // this will update the current code
1978 setCode(sketch.getCurrentCode());
1979 }
1980
1981
1982 /**

Callers 1

stopTweakModeMethod · 0.95

Calls 8

setCodeMethod · 0.95
getCodeMethod · 0.80
getProgramMethod · 0.80
getSavedProgramMethod · 0.80
setProgramMethod · 0.80
getCurrentCodeMethod · 0.80
equalsMethod · 0.45
setDocumentMethod · 0.45

Tested by

no test coverage detected