Quick fixes do not provide good support for readonly files
维护者通常 4 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- java, typescript, vscode
调研方向
首先跟踪 Quick Fix 菜单,以及 language server 对匹配 VS Code files.readonlyInclude 设置的文件的处理。分别复现文件未打开和在编辑器中打开这两种情况,然后验证只读文件的修复是否会被隐藏或禁用,说明它们为什么无法运行,并确保绝不会留下仅存在于内存中的更改。
由索引模型根据 Issue 内容生成。
描述
Description of issue
The Quick Fix menu in VS Code provides several options to fix common compiler errors, such as creating a missing method in a class.
However, this menu can be misleading for users when the affected files are marked as readonly in VS Code using the files.readonlyInclude workspace setting.
When a file is marked readonly, a Quick Fix option may still be presented to add a method or other class member to it. Selecting that option seems to have a couple of different possible behaviors:
- If the file is not open in an editor tab, the Quick Fix operation has no effect but presents no message to the user explaining why
- If the file is open in an editor tab, the Quick Fix operation will seem to apply the requested change, and the language server receives updated content for the file (meaning the red squiggle goes away). However, the updated content is not actually written to disk. Builds will fail with compilation errors. If the editor tab is closed, then the language server will refresh from the file on-disk and the red squiggle will return. Even though the changes are in-memory-only, the file does not show the white circle on the tab header indicating unsaved changes.
Requested change
Change to a more intuitive behavior for the Quick Fix options:
- Hide (or gray out) any Quick Fix options that would require changes to readonly files
- Present a popup message to the user after the Quick Fix is selected explaining that it can't be used on readonly files
At the least, the Quick Fix should not make in-memory-only changes.
Software versions
VS Code: Tested on both 1.96.2 and 1.106.3
Java Extension: 1.50.0
OS: MacOS 15.6.1
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 5 小时 36 分钟
- 30 天内合并 PR
- 10
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
redhat-developer/vscode-java 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
redhat-developer/vscode-java#4511 ·
维护者通常 4 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
redhat-developer/vscode-java#4426 ·
维护者通常 4 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 45/100
redhat-developer/vscode-java#4506 · 6 条评论 · 4 个 reaction ·
维护者通常 4 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 45/100
redhat-developer/vscode-java#4505 · 5 条评论 · 2 个 reaction ·
维护者通常 4 天内回复
-
难度 4/5 3-5 天 新手友好度 52/100
redhat-developer/vscode-java#4504 · 3 条评论 · 1 个 reaction ·
维护者通常 4 天内回复
查看 redhat-developer/vscode-java 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
melgarafael/DeskcommCRM#1812 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
prisma/prisma-cli#309 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
gregwebs/pi-quota-dispatcher#26 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
openwatersio/slackwater.xyz#124 ·
维护者通常 1 天内回复
-
agent-reported area/browser area/docs documentation good first issue hacktoberfest help wanted P2
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 2 天内回复