redhat-developer / redhat-developer/vscode-java

Bug: Formatter causing some lines get erased

未关闭
#2,107 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

formatter
主要语言
TypeScript
星标
2.3k
派生
546
平均合并
20 小时 1 分钟
30 天内合并 PR
11

描述

I love to use VSC Java plugin but I had so much pain working with java now.
The reason I like vscode now only for the ui but this plugin is very customisable like a way to line up curly bracket.
Now the "Format Document" is glitchy, it somehow erased some part of the code when I indent it.
I'm not sure if it's related to any tokens because when this happens, if I didn't remember wrongly, it caused the semantic highlight changed too. But then the semantic tokens bug were patched but this issue persist (still there).

Environment
Operating System: Windows 10
JDK version: 14
Visual Studio Code version: 1.60.0 before update also the same
Java extension version: -
Steps To Reproduce
Just edit the code and with comments, on performing indentation, it will cause glitches
This happens when I start typing code for long time.
semantic token

I don't know if this info help, since this plugin doesn't have built-in option to line up braces plus the default switch-case indentation is weird, so I use this profile:
configuration.zip

Could it be this profile is causing conflict? I'd be glad to provide more information if needed.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,在 Windows 10 上使用 JDK 14、Java 注释和提供的 configuration.zip 重现 Format Document,尤其是在长时间输入之后。将结果与语义高亮进行比较,并检查源代码行是否被擦除;完成的标准是格式化保留所有代码,并使高亮保持完整。

由索引模型根据 Issue 内容生成。

评估

技术栈
java, vscode
领域
tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。