-
-
Notifications
You must be signed in to change notification settings - Fork 490
ATL-1106: Made all non-workspace editors read-only. #264
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
Conversation
Signed-off-by: Akos Kitta <kittaakos@typefox.io>
4ba8bb9
to
c6a1db4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really great Akos. Thanks!
I did find a related problem, which is that the tab control menu allows me to delete or rename the files opened via "Go to Definition". I could see a user using "delete" to remove what appears to be an unwanted file from their sketch. But I'm guessing that is out of scope for this PR, so I'm giving a resounding thumbs up on this.
ubidefeo
commented
Mar 25, 2021
Downloading now, but I share @per1234 's opinion that non-workspace files should not be deleted.
I see one problem ahead: are files in the Sketch's src
folder considered Workspace file?
Those ones should be editable and deletable.
Can of worms, anyone?
opinion that non-workspace files should not be deleted.
I open a follow-up.
are files in the Sketch's
src
folder considered Workspace file?
Yes. They're part of the Theia/VS Code workspace (== current sketch folder.)
Those ones should be editable and deletable.
You should be able to delete and modify them. If no, it's a bug.
opinion that non-workspace files should not be deleted.
I open a follow-up.
Here is the follow-up: #274
@ubidefeo
ubidefeo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and working
What it does:
This PR makes all editors that are not in the current workspace (sketch folder) read-only.
Try the
Peek
>Peek Definiton
functionality onSerial#begin
andbar
. (Note the cursor location:<|>
):Sketch.ino
:Other.h
:Serial#begin
should open in a read-only embedded editor. You should be able to edit in the embedded editor if you peek at the definition ofbar
. Opening an editor should behave the same as the embedded peek editor. Please review. Thank you!Signed-off-by: Akos Kitta kittaakos@typefox.io