redhat-developer / redhat-developer/vscode-java

Compact source files should not cause package error when placed in subfolders

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

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 am a teacher and I want to use Compact Source files in my courses. But since the students will have many programs to write, I want to place them in subfolders. Right now, when I do that, I get a compile error that the package does not match the folder where the Compact Source file is located : The declared package "" does not match the expected package "sandbox" Java(536871240) .

Is it possible to add the relative path of the Compact Source implicitly to the classpath/sourcepath while compiling/running/debugging the file? So each time a Compact Source is detected, only the relative path to that file is added, not all path to all Compact Source in the project. An option could be useful, like "Implicitly add relative path of Compact Source to sourcepath : true/false".

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

Reproduziere den Java(536871240)-Paketfehler mit einer Compact Source-Datei in einem Unterordner und verfolge anschließend, wie Compact Source-Dateien während der Kompilierung, Ausführung und des Debuggens behandelt werden. Als erledigt gilt, wenn die Datei aus ihrem Unterordner ohne den Paketfehler funktioniert und bei aktiviertem Verhalten nur ihr relativer Pfad zum sourcepath hinzugefügt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
java, typescript, vscode
Bereich
developer-experience, tooling
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 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.