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

Method checkSketchbookTemplate

app/src/processing/app/Mode.java:243–252  ·  view source on GitHub ↗

See if the user has their own template for this Mode. If the default extension is "pde", this will look for a file called sketch.pde to use as the template for all sketches.

()

Source from the content-addressed store, hash-verified

241 * as the template for all sketches.
242 */
243 protected File checkSketchbookTemplate() {
244 File user = new File(Base.getSketchbookTemplatesFolder(), getTitle());
245 if (user.exists()) {
246 File template = new File(user, "sketch." + getDefaultExtension());
247 if (template.exists() && template.canRead()) {
248 return user;
249 }
250 }
251 return null;
252 }
253
254
255 public File getTemplateFolder() {

Callers 1

addTemplateFilesMethod · 0.95

Calls 3

getTitleMethod · 0.95
getDefaultExtensionMethod · 0.95

Tested by

no test coverage detected