redhat-developer / redhat-developer/vscode-java
Extracting local variables and refactoring leads to naming conflicts
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
[provide a description of the issue]
Environment
Operating System: Windows11
JDK version: 17
Visual Studio Code version: 1.88
Java extension version: 1.29
Steps To Reproduce
- select "20"
- click “Refacator-Extract local variable”
- new variable name " existingVariable"
public class OriginalClass {
public void method() {
int existingVariable = 10;
// extract variable "20" , name :"existingVariable"
System.out.println(20);
}
}
refactoring result:
Reason: When extracting local variables, there was no detection of naming conflicts between the new variable name and the context
Expected behavior: Check for naming conflicts before and after refactoring, and provide warning prompts
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用列出的 Java 和扩展版本,通过提供的 OriginalClass 示例和 existingVariable 名称,在 VS Code 中复现报告的“Extract local variable”重构。跟踪重构入口,以确定冲突检查的位置。完成标准是:在重构前或重构后检测到冲突并显示警告,而不是悄无声息地产生冲突结果。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, typescript, vscode
- 领域
- developer-experience, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100