redhat-developer / redhat-developer/vscode-java

Overwrites java home in .settings/org.eclipse.buildship.core.prefs

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

还没有人认领这个 Issue。

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

描述

As vscode-java is apparently not capable of generating the .settings/org.eclipse.buildship.core.prefs file (mabe #666), I have to check it into git.
But everytime vscode-java tries to set the java.home= field in this file to my local path to the local JDK, which might differ from other developers workspace setups.

Environment
  • Operating System: Windows 10
  • JDK version: Amazon Corretto 11
  • Visual Studio Code version: 1.63.2
  • Java extension version: 1.2.0
Steps To Reproduce
  1. Open/Import a Java project folder with Gradle build (worked for me only after having an Eclipse IDE instance generate the .settings/org.eclipse.buildship.core.prefs file)
  2. set the java.home= line to an empty value. VSCode seems to work fine nevertheless.
  3. Use VSCode, run your project, develop... At some point something changes the file to set the value to the lokal JDK path (e.g. C\:/Program Files/Amazon Corretto/jdk11.0.12_7) This can be forced by "Java: Clean the Java Language Server Workspace"

[Please attach a sample project reproducing the error]
I guess it's not an error per se.

Please attach logs
vscode-java.log

Current Result

See above.

Expected Result

The .settings/org.eclipse.buildship.core.prefs file should either be committable (thus workspace-agnostic) or generateable (so it does not have to be committed to git).

Additional Informations

贡献指南

打开贡献指南

从这里开始

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

调研方向

从已提交的 .settings/org.eclipse.buildship.core.prefs 文件开始,并在报告中的 Windows 和 JDK 配置下使用“Java: Clean the Java Language Server Workspace”重现该更改。使用链接的 vscode-java.log 来确定是什么重写了 java.home;完成的标准是该首选项保持与 workspace 无关,或可以在不要求机器特定路径的情况下生成该文件。

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

评估

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

把新 issue 发到你的邮箱

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