arduino / arduino/Arduino

don't hardcode which "bare minimum" sketch is open at start

Open
#10,105 1 comment 0 reactions 0 assignees View on GitHub
Component: IDE feature request
Dominant language
Java
Stars
14.6k
Forks
7k
PR merge metrics
No merged PRs in 30d

Description

At the moment the default file that opens is [hardcoded](https://github.com/arduino/Arduino/blob/933bbb3a3975329e549331c447eb99c4cde2dd11/app/src/processing/app/Base.java#L767)

` FileUtils.copyFile(new File(getContentFile("examples"), "01.Basics" + File.separator + "BareMinimum" + File.separator + "BareMinimum.ino"), newbieFile);
`

The bare minimum sketch is embedded into the app, which gets signed on Mac OS X, so it becomes impossible to modify that template.

It would be good to let the user decide which sketch path to read and load into a new document at startup (may be in preference file, does not need to be in the UI).

Contributor guide

Open the contributing guide

Research direction

Start in app/src/processing/app/Base.java at the hardcoded BareMinimum copy shown in the issue, then trace how the startup document is created and where preferences are read. Define a preference for the sketch path and verify that a new document loads that file instead of the embedded template at startup.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.