redhat-developer / redhat-developer/vscode-java

"No build tools" Java projects auto-import skipped due to presence of "build tools" Java projects in same workspace

Offen
#4,363 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug
Vorherrschende Sprache
TypeScript
Sterne
2.3k
Forks
546
Ø Merge
20 Std. 1 Min.
Gemergte PRs (30 T.)
11

Beschreibung

Describe the bug
Java projects without build tools are being skipped during auto-import due to the presence of Java projects with build tools in the same workspace. This results in missing imports and project configuration issues.

To Reproduce
Steps to reproduce the behavior:

  1. Create a workspace containing both Java projects with build tools (e.g., Maven, Gradle) and Java projects without build tools.
  2. Clean the Java language server workspace to trigger auto-import on startup.
  3. The Java projects without build tools fail to auto-import properly or are ignored/skipped by the extension, as they are not visible in the list of projects to import and do not import at all when opening any Java file in such projects.

Expected behavior
Java projects without build tools should be available as options to select in the import java projects list, allowing a non-build-tooled Java project to be imported correctly instead of skipped.

Environment

  • Operating System: Windows
  • JDK version: 21
  • Visual Studio Code version: 1.111.0
  • Java extension version: 1.53.0

Additional Information
When opening a Java file in a Java project without build tools, it will be automatically imported and added to the Java projects list, therefore auto-importing works fine as long as build tools projects aren't in the same workspace.

The best solution seems to be to add these types of projects to the list of importable Java projects and allow selection of non-build-tooled projects.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduzieren Sie das Problem in Visual Studio Code mit einem Workspace, der sowohl Maven- oder Gradle-Projekte als auch Projekte ohne Build-Tools enthält, und bereinigen Sie anschließend den Workspace des Java language server, um den automatischen Import beim Start auszulösen. Verfolgen Sie die Liste der importierbaren Projekte und überprüfen Sie, dass Projekte ohne Build-Tools dort erscheinen und ausgewählt und importiert werden können, ohne zuvor eine Java-Datei zu öffnen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java, typescript, vscode
Bereich
developer-experience, tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.