jadx icon indicating copy to clipboard operation
jadx copied to clipboard

[feature][gui] References search

Open skylot opened this issue 3 years ago • 2 comments

Current Find usage dialog functionality is limited to only usage, but there are many types of relations in code such as:

  1. definition - now it is very tedious every time to go to definition to check, for example, field initial value or method access flags. So it will be nice to have a way to check definition without actual jump to it
  2. overrides - list of methods which are override current method or overridden by it.
  3. class hierarchy - list or tree of extended classes or interfaces
  4. fields shadowing - similar to method override
  5. field reads and writes separated (#2034)

These relations can be shown in different tool windows or merged in one References search with collapsible sections for different relations types. Also, it will be nice to have search in usage dialog itself to filter only interested classes/methods.

Discussion of this feature was started in https://github.com/skylot/jadx/issues/1361#issuecomment-1030212293

skylot avatar Feb 06 '22 09:02 skylot

Just adding my 2 cents. I would rather see these features all in one reference search box rather than different windows for each feature. That would make it easier to review all of the ways an object is used in one box without the need to keep doing different lookups. I am also concerned that JadX's GUI will eventually start to look cluttered as new features are included and using a single reference lookup would avoid adding redundant options to the right click dropdown.

I wonder if you can reuse the search window as it sounds like the GUI needs are almost the same.

jmlitfi avatar Feb 06 '22 21:02 jmlitfi

Also, could it be possible to add a call hierarchy for methods with in and out capabilities ? In from a selected method (1), make a tree of all methods called in this method (2), choose a method (2) in the tree to show all methods called from this method (2)... Out from a selected method (1), make a tree of all methods which called this method (1), choose a method (2) in the tree to show all methods which is called by method (2)... Out is a sort of Find usage in a tree form.

psolyca avatar Jul 21 '22 14:07 psolyca