redhat-developer / redhat-developer/vscode-java

Unable to add external jar to work with LSP

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

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

主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
11

説明

I'm using Visual Studio Code for a Java project without build tools (e.g., Maven or Gradle). I've added JAR files using the java.project.referencedLibraries setting. While auto-completion and documentation pop-ups work, there is no proper syntax highlighting (LSP-based) for the referenced classes and methods within the JARs.

Steps to Reproduce:
  1. Open a Java project in VS Code.
  2. Add JAR files directly to the java.project.referencedLibraries setting.
  3. Use a class or method from the JAR in your code.
Expected Behavior:

LSP features should include syntax highlighting for classes and methods from the JARs, in addition to auto-completion and documentation pop-ups.

Actual Behavior:

While auto-completion and documentation pop-ups work, syntax highlighting does not apply for the JAR dependencies.

Screenshot:
  • Referencing the JAR:
    Screenshot1
  • Missing syntax highlighting:
    Screenshot2
Additional Context:

This issue occurs in a setup without Maven or Gradle. Are there additional configurations required to enable full syntax highlighting for JAR dependencies?

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Maven や Gradle を使わず、java.project.referencedLibraries 設定を使用する Java プロジェクトで VS Code 上の問題を再現し、その後、参照される JAR のクラスがシンタックスハイライトのためにどのように処理されるかを追跡します。完了条件は、これらの JAR のクラスとメソッドにシンタックスハイライトが適用され、補完とドキュメントが引き続き機能することです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, vscode
領域
devtools
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。