Skip to content

Make editor detect external changes to open tabs in the currently open Sketch #296

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

Closed
Lorandil opened this issue Apr 1, 2021 · 5 comments
Assignees
Labels
conclusion: invalid Issue/PR not valid criticality: medium Of moderate impact topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@Lorandil
Copy link

Lorandil commented Apr 1, 2021

Sometimes a source fiIe that is open in the Arduino IDE becomes modified
from an external program (e.g. an alternate text editor like notepad++, or a
bitmap in a header file which was converted to hex by tools like image2cpp).
Because the Arduino IDE doesn't detect these modifications, it is required to
close and reopen the sketch or else changes might get lost.

I would like the IDE to detect the file change and ask what to do (like in notepad++).
This feature would help beginners, because it is frustrating if changes are ignored or
become lost.

There might even be a setting to automatically open the changed file (which will
become tricky, if there are unsaved changes).

@Lorandil Lorandil added the type: enhancement Proposed improvement label Apr 1, 2021
@ubidefeo
Copy link

ubidefeo commented Apr 1, 2021

or a bitmap in a header file which was converted to hex by tools like image2cpp

that's how you sold it to me :)

@ubidefeo ubidefeo added the priority: medium Resolution is a medium priority label Apr 1, 2021
@ag88
Copy link

ag88 commented Apr 2, 2021

in eclipse to 'add missing files' or to get the workspace project updated, it is pressing F5 (refresh), i'm not sure how easy or difficult to implement similar

@ubidefeo
Copy link

ubidefeo commented Apr 6, 2021

relates to #284

@ubidefeo ubidefeo changed the title Make editor detect external changes to open files in a sketch Make editor detect external changes to open tabs in the currently open Sketch Apr 6, 2021
@per1234
Copy link
Contributor

per1234 commented Oct 25, 2021

The description of the IDE's current behavior provided here seems either incorrect (outdated?) or misleading to me. Here is the current behavior:

If the sketch is in a saved state (which it will always be if the "Auto Save" setting is enabled), all external changes to the sketch files are immediately loaded automatically.

If the sketch is in an unsaved state and there have been external changes, the IDE asks the user if they would like to overwrite on save:

image


This is different from the behavior of Notepad++, which prompts on external changes rather than loading them automatically:

image

However, the IDE's behavior does align fairly closely with the VS Code behavior, so it's not as though the IDE's current behavior is unusual.

@rsora rsora added criticality: medium Of moderate impact and removed priority: medium Resolution is a medium priority labels Nov 2, 2021
@per1234 per1234 self-assigned this Dec 24, 2022
@per1234 per1234 added the topic: code Related to content of the project itself label Dec 24, 2022
@per1234
Copy link
Contributor

per1234 commented Dec 24, 2022

As I explained in my previous comment, Arduino IDE already has this behavior so I will close this as resolved. If anyone finds that external changes to a saved sketch file are not reflected in the Arduino IDE editor when using the latest nightly build of Arduino IDE, then please submit a new bug report and we will investigate it.

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 24, 2022
@per1234 per1234 added the conclusion: invalid Issue/PR not valid label Dec 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: invalid Issue/PR not valid criticality: medium Of moderate impact topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

5 participants