redhat-developer / redhat-developer/vscode-java
Zipped sources are not respected
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
Description
Zipped source files in java.project.referenceLibraries::sources are not being respected and instead, navigating to the source just gives you code decompiled by IntelliJ FernFlower. This messes up the autocomplete because the argument names will be generic things like arg0 while the source files in the zip file have properly named variables.
I am creating a module for Ghidra in VSCode using their skeleton project generation tool, which autopopulates a settings.json file with the relevant libraries and sources from your Ghidra installation path.
Environment
- Gradle 8.14.1 (
GRADLE_HOMEdefined) - Ghidra 11.4.2 (in
/opt/ghidra/ghidra_11.4.2_PUBLIC) - OpenJDK 23.0.2 (
JAVA_HOMEdefined) - Offline (see settings.json)
- Version: 1.50, 1.48 for Linux x64
Expected behaviour
- Right-clicking on a library function should show its definition as defined in the source file.
- Function autocomplete should show correct names for parameters
Actual behaviour
- Right-clicking on a library function takes you to a class decompiled with FernFlower
- Function autocomplete uses generic argument names like
arg0
Steps to reproduce
- Install Ghidra
- Use provided settings.json
- Open the attached project (it assumes Ghidra is in the above path)
- In
src/java/main/java/ghidraproject/GhidraProject.java:- Navigate to
GhidraProjectPlugin.MyProvider::createActions - Hover over line 108:
dockingTool.addLocalActionvoid docking.Tool.addLocalAction(ComponentProvider arg0, DockingActionIf arg1);
- Navigate to
- Compare with source:
- Extract
Docking-src.zipfrom/opt/ghidra/ghidra_11.4.2_PUBLIC/Framework/Docking/lib/Docking-src.zip - Go to
docking/Tool.javaand viewaddLocalAction@ line 157void docking.Tool.addLocalAction(ComponentProvider componentProvider, DockingActionIf action);
- Extract
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
Beginnen Sie damit, das Problem mit den angehängten settings.json und GhidraProject.zip zu reproduzieren, wobei Sie sich auf java.project.referenceLibraries::sources und die Navigation von GhidraProject.java konzentrieren. Vergleichen Sie die dekompilierte Signatur mit Docking-src.zip; abgeschlossen ist die Aufgabe, wenn Navigation und Autovervollständigung die Parameternamen des Quellarchivs verwenden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, vscode
- Bereich
- developer-experience, tooling
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100