redhat-developer / redhat-developer/vscode-java

Zipped sources are not respected

オープン
#4,279 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug Gradle standalone files
主要言語
TypeScript
スター
2.3k
フォーク
546
平均マージ
20時間 1分
マージ済み PR(30日)
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_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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. 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

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。