redhat-developer / redhat-developer/vscode-java

Reference other unmanaged folders as dependencies

Aperta
#2,853 5 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

[provide a description of the issue]

Environment
  • Operating System: ANY
  • JDK version: 11
  • Visual Studio Code version: 1.74.2
  • Java extension version: Any
Steps To Reproduce
  1. Create a javaproject 0, a package and a class
  2. Create other project 1 a package and a class where you use class of project 0.

Suppose I have 4 independent Java projects: project0, project1, project2, and project3.

Inside each project, I have the src folder, and inside some packages and classes. Project 1, 2, and 3 use classes from project0.

In Eclipse, I can indicate in a section that the sources of project 0 are used. When I try something similar in VScode, I go to configure the classpath of project one and see that it includes its src folder. When I add the src folder of project0, I get the following error: "The source path must be contained in the project root folder."

I can solve this by creating the .jar of project 0 and adding it to the other projects, but this is very inconvenient when making quick tests.

I know there are tools like Maven or Ant to do these things, but I would like to know if there is any way to indicate in vscode that one project uses classes from another without having to include the .jar as a dependency.

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

Non sono indicati file sorgente, test o punti di ingresso. Inizia riproducendo la configurazione a quattro progetti e tracciando la configurazione del classpath dell’estensione Java, in particolare la validazione del percorso delle sorgenti. Il lavoro sarà completato quando project1, project2 e project3 potranno fare riferimento alle sorgenti non gestite di project0 senza creare un JAR né attivare l’errore relativo alla radice del progetto.

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

Valutazione

Stack tecnologico
java, vscode
Ambito
developer-experience
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.