redhat-developer / redhat-developer/vscode-java
Unable to add external jar to work with LSP
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.3k
- Forks
- 546
- Ø Merge
- 20 Std. 1 Min.
- Gemergte PRs (30 T.)
- 11
Beschreibung
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:
- Open a Java project in VS Code.
- Add JAR files directly to the
java.project.referencedLibrariessetting. - 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:
- Missing syntax highlighting:
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?
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduzieren Sie das Problem in VS Code mit einem Java-Projekt ohne Maven oder Gradle und der Einstellung java.project.referencedLibraries. Verfolgen Sie anschließend, wie Klassen aus referenzierten JAR-Dateien für die Syntaxhervorhebung behandelt werden. Als abgeschlossen gilt die Aufgabe, wenn Klassen und Methoden aus diesen JAR-Dateien eine Syntaxhervorhebung erhalten und Vervollständigung sowie Dokumentation weiterhin funktionieren.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, vscode
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100