redhat-developer / redhat-developer/vscode-java

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

オープン
#2,293 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Gradle preferences
主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
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. リポジトリをフォークし、ブランチを切って変更します。
  4. 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 を短くまとめたダイジェスト。