redhat-developer / redhat-developer/vscode-java

java.import.maven.enabled setting not honored

Aperta
#1,057 0 commenti 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Maven
Lingua principale
TypeScript
Stelle
2.3k
Fork
546
Merge medio
20h 1m
PR unite (30g)
11

Descrizione

Currently, the "java.import.maven.enabled":false setting requires that the .project, .classpath files and the .settings directory be removed and the Java workspace cleaned before taking effect (see https://github.com/redhat-developer/vscode-java/issues/634#issuecomment-529466893). This is clunky and poorly-documented.

Ideally, setting the "java.import.maven.enabled":false should immediately take effect. Less ideally, there should be clear documentation around the use of this setting to instruct users to clear out the files and clean the workspace.

Truthfully, my use case is to disable the Java language features for one of the folders in my multi-root workspace. This is currently made possible by disabling the import, but one could imagine a world in which this is a different setting, which would take effect immediately.

Environment
  • Operating System: Windows 10 1809
  • JDK version: 1.8.0_221
  • Visual Studio Code version: 1.38.0
  • Java extension version: 0.48.0
Steps To Reproduce
  1. Open a fresh workspace in VS Code
  2. Open a folder containing a Java project - we'll call this Project1
    1. The Java extension will immediately import and start compiling the code
  3. Add another folder containing another Java project to the workspace - we'll call this Project2
    1. The Java extension will immediately import and start compiling the code
  4. Restart VS Code
    1. The Java extension will immediately start compiling the code for both projects
  5. Edit Project2's VS Code settings ([project2]/.vscode/settings.json) to contain the following:
    {
        "java.import.gradle.enabled":false,
        "java.import.maven.enabled":false
    }
    
  6. Restart VS Code
    1. The Java extensions will immediately start compiling the code for both projects
Current Result

Immediately after setting the "java.import.maven.enabled":false property, the Java language features are still alive and active in the project.
Even after a restart of VS Code, the Java language features are still alive and active.

Expected Result

Immediately after setting the "java.import.maven.enabled":false property, the Java language features for the project should stop working.
After a restart of VS Code, the Java language features for the project should not load.

Additional Informations

This issue was based on a conversation with @snjeza in the VS Code Java Extension gitter channel.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Iniziare riproducendo il comportamento dell'area di lavoro multi-root usando Project2/.vscode/settings.json e l'impostazione java.import.maven.enabled. Verificare in che modo i file .project, .classpath e .settings esistenti influenzano l'importazione dopo un riavvio; l'attività è completata quando la disabilitazione dell'impostazione ha effetto senza dover rimuovere manualmente tali file, oppure quando la pulizia necessaria è documentata chiaramente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java, typescript, vscode
Ambito
developer-experience, tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.