redhat-developer / redhat-developer/vscode-java

Zipped sources are not respected

Open
#4,279 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Gradle standalone files
Dominant language
TypeScript
Stars
2.3k
Forks
546
Avg merge
20h 1m
Merged PRs (30d)
11

Description

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_HOME defined)
  • Ghidra 11.4.2 (in /opt/ghidra/ghidra_11.4.2_PUBLIC)
  • OpenJDK 23.0.2 (JAVA_HOME defined)
  • 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

  1. Install Ghidra
  2. Use provided settings.json
  3. Open the attached project (it assumes Ghidra is in the above path)
  4. In src/java/main/java/ghidraproject/GhidraProject.java:
    1. Navigate to GhidraProjectPlugin.MyProvider::createActions
    2. Hover over line 108: dockingTool.addLocalAction
      void docking.Tool.addLocalAction(ComponentProvider arg0, DockingActionIf arg1);
      
  5. Compare with source:
    1. Extract Docking-src.zip from /opt/ghidra/ghidra_11.4.2_PUBLIC/Framework/Docking/lib/Docking-src.zip
    2. Go to docking/Tool.java and view addLocalAction @ line 157
      void docking.Tool.addLocalAction(ComponentProvider componentProvider, DockingActionIf action);
      

GhidraProject.zip

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the attached settings.json and GhidraProject.zip, focusing on java.project.referenceLibraries::sources and the navigation from GhidraProject.java. Compare the decompiled signature with Docking-src.zip; done means navigation and autocomplete use the source archive's parameter names.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.