MCPcopy
hub / github.com/arduino/Arduino / storeRecentSketches

Method storeRecentSketches

app/src/processing/app/Base.java:630–640  ·  view source on GitHub ↗
(SketchController sketch)

Source from the content-addressed store, hash-verified

628 }
629
630 protected void storeRecentSketches(SketchController sketch) {
631 if (sketch.isUntitled()) {
632 return;
633 }
634
635 Set<String> sketches = new LinkedHashSet<>();
636 sketches.add(sketch.getSketch().getMainFilePath());
637 sketches.addAll(PreferencesData.getCollection("recent.sketches"));
638
639 PreferencesData.setCollection("recent.sketches", sketches);
640 }
641
642 protected void removeRecentSketchPath(String path) {
643 Collection<String> sketches = new LinkedList<>(PreferencesData.getCollection("recent.sketches"));

Callers 3

handleOpenMethod · 0.95
handleSave2Method · 0.80
handleSaveAsMethod · 0.80

Calls 6

getCollectionMethod · 0.95
setCollectionMethod · 0.95
isUntitledMethod · 0.80
getMainFilePathMethod · 0.80
addMethod · 0.45
getSketchMethod · 0.45

Tested by

no test coverage detected