redhat-developer / redhat-developer/vscode-java
Zipped sources are not respected
还没有人认领这个 Issue。
- 主要语言
- TypeScript
- 星标
- 2.3k
- 派生
- 547
- 平均合并
- 20 小时 1 分钟
- 30 天内合并 PR
- 11
描述
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
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先使用附带的 settings.json 和 GhidraProject.zip 重现该问题,重点关注 java.project.referenceLibraries::sources 以及从 GhidraProject.java 进行的导航。将反编译后的签名与 Docking-src.zip 进行比较;当导航和自动补全使用源代码归档中的参数名称时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java, vscode
- 领域
- developer-experience, tooling
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 38/100