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

Method removeCode

app/src/processing/app/Sketch.java:710–724  ·  view source on GitHub ↗

Remove a SketchCode from the list of files without deleting its file. @see #handleDeleteCode()

(SketchCode which)

Source from the content-addressed store, hash-verified

708 * @see #handleDeleteCode()
709 */
710 public void removeCode(SketchCode which) {
711 // remove it from the internal list of files
712 // resort internal list of files
713 for (int i = 0; i < codeCount; i++) {
714 if (code[i] == which) {
715 for (int j = i; j < codeCount-1; j++) {
716 code[j] = code[j+1];
717 }
718 codeCount--;
719 code = (SketchCode[]) PApplet.shorten(code);
720 return;
721 }
722 }
723 System.err.println("removeCode: internal error.. could not find code");
724 }
725
726
727 /**

Callers 2

handleDeleteCodeMethod · 0.95
checkFilesMethod · 0.80

Calls 2

shortenMethod · 0.95
printlnMethod · 0.45

Tested by

no test coverage detected