Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow closing tabs from files in src subfolder of sketch #831

Closed
per1234 opened this issue Feb 13, 2022 · 2 comments · Fixed by #946
Closed

Allow closing tabs from files in src subfolder of sketch #831

per1234 opened this issue Feb 13, 2022 · 2 comments · Fixed by #946
Assignees
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@per1234
Copy link
Contributor

per1234 commented Feb 13, 2022

Describe the current behavior

When a sketch is opened in the Arduino IDE, all source files in the root of the sketch folder are opened in editor tabs.

All these source files are compiled into a single program. Since this fact may not be apparent to users who are accustomed to single file sketches and thus think of the .ino file as the sketch unit rather than the entire folder, a control for closing them is intentionally omitted from the primary UI.

Complex sketches (e.g., Marlin) may contain many source files. In this case, it can be convenient to expose only a subset of the files to the user. This is accomplished by putting the files under the src subfolder of the sketch. The contents of this folder are compiled recursively, but they are not opened in the Arduino IDE editor by default.

It is possible to open the files from the src subfolder via the IDE's "Sketchbook" view.

🙁 Once opened, there is no way to close these files again via the primary UI.

To reproduce

  1. Put this "HasSrcFolder" sketch to your sketchbook: HasSrcFolder.zip
  2. Open the "HasSrcFolder" sketch in the Arduino IDE.
  3. Select File > Preferences... from the Arduino IDE menus.
  4. Check the box next to "☐ Show files inside Sketches".
  5. Click the OK button.
  6. Open the Sketchbook view.
  7. Click on HasSrcFolder/src/InSrcFolder.cpp
    🙁 There is no way to close the InSrcFolder.cpp tab via the primary UI.
  8. Select File > Quit from the Arduino IDE menus.
  9. Start the Arduino IDE.
    🙁 The InSrcFolder.cpp tab is still open even after a restart.

image

Describe the request

Add X icons to all editor tabs except the source files in the root of the sketch folder.

Desktop

  • OS: Windows 10
  • Version: 2.0.0-rc3-snapshot-2f9bf86
    Date: 2022-02-11T14:52:06.341Z
    CLI Version: 0.21.0 [10107d24]

Additional context

Another primary UI path to opening these files will be provided once #722 is fixed.


Related: #866

@per1234 per1234 added type: enhancement Proposed improvement topic: code Related to content of the project itself labels Feb 13, 2022
@IanBUK
Copy link

IanBUK commented Apr 18, 2022

This please. This is one of the major changes that would massively improve the ide.

@per1234 per1234 added the conclusion: resolved Issue was resolved label Apr 19, 2022
@francwalter

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants