Show source jar file for the currently opened class tab

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
java
領域
desktop

調査の方向性

DockContainerLeaf#getSelectedDockable() を使ってアクティブなタブの検索から始め、NavigationManager を介して PathNode の親チェーンをたどり、最も近い ResourcePathNode までそのクラスを追跡します。ネストされたリソースを含め、包含している jar またはファイルを最も適切に表示できる UI サーフェスを特定します。複数の jar と埋め込み jar を含むワークスペースで、アクティブなクラスのタブがそのソースを明確に示せれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Is your feature request related to a problem? Please describe.
When a workspace has multiple loaded jars (either as the primary resource, or as embedded resources inside a supporting directory resource), there's no straightforward way in the UI to tell which jar file a given open tab's
class actually came from. This becomes especially painful with workspaces containing a lot of jars.

Currently the only way I found to get this info was writing a custom script that walks the PathNode parent chain via NavigationManager to find the nearest ResourcePathNode, and cross-references the active tab via DockContainerLeaf#getSelectedDockable().

Describe the solution you'd like
Surface the source resource directly in the UI for the currently open/active tab, for example:

  • Show the containing jar/file name in the tab's tooltip
  • Show it in a status bar at the bottom of the window
  • Add a "Reveal in tree" / "Locate resource" context menu action on the tab, which expands the workspace tree to the resource that contains the class

Describe alternatives you've considered
Manually switching between resources in the workspace tree dropdown and searching for the class visually — not practical with a large number of jars.

Additional context
Happy to test this against a workspace with a lot of jars if useful for verifying the fix works with deeply nested/mbedded resources (directory resource containing multiple jar resources).

主要言語
Java
スター
7.5k
フォーク
549
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Col-E/Recaf のほかの issue

Col-E/Recaf の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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