Recaf icon indicating copy to clipboard operation
Recaf copied to clipboard

Add Call Graph [WIP]

Open Amejonah1200 opened this issue 3 years ago • 7 comments

recaf

TODO:

  • [x] Call Graph Docking
    • [x] Move to own Window
    • [x] Bundle in one TabPane for Docking
    • [x] Refocus of method (navigation)
  • [x] Method Handles (?)
  • [x] Dynamic methods
  • [x] Fix NPE
  • [x] Support for workspace updates:
    • [x] Add Library
    • [x] Add new class
    • [x] Update Class
    • [x] Delete Class
    • [x] Remove Library
  • [x] LinkerResolver caching
  • [x] Show unresolved calls
  • [x] Threading Issues?
  • [x] Cache ClassInfo?
  • [ ] Optimize renaming and other changes that affect this feature
  • [x] ~~Make Toggle for Call Graph~~

Amejonah1200 avatar Sep 25 '22 14:09 Amejonah1200

This PR is stuck, as it needs an inheritance graph which can resolve methods correctly compliant with JVM behavior. https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-5.html#jvms-5.4.3.3

Amejonah1200 avatar Oct 09 '22 14:10 Amejonah1200

Thanks to @xxDark with https://jitpack.io/#xxDark/jlinker , I will try to implement further calls.

Amejonah1200 avatar Oct 23 '22 12:10 Amejonah1200

On another note, I will probably switch to a standalone tab/window (dock) instead of it being at the right.

Amejonah1200 avatar Oct 23 '22 12:10 Amejonah1200

Migrated to new branch under: https://github.com/Col-E/Recaf/tree/dev4/recaf-api/src/main/java/software/coley/recaf/services/callgraph

Anything seem to be missing?

Col-E avatar Jun 22 '23 05:06 Col-E

image

Feedback from xDark, can address on dev4

image

Feedback from Amejonah

Col-E avatar Jun 23 '23 16:06 Col-E

image There are reports, these colors are not very suitable. If someone can give better ones, I would gladly accept and integrate.

Otherwise, I would put this as ready to be merged.

Amejonah1200 avatar Aug 28 '23 22:08 Amejonah1200

image When renaming a method, it slows down. Needs more investigation.

Amejonah1200 avatar Aug 29 '23 11:08 Amejonah1200

Its finally been ported over to dev4 🥳

2acd33aad355c708d0b7fac71f1cf721d453f774

Col-E avatar Jun 12 '24 12:06 Col-E

Closing now that 4.X has the same functionality, we can continue from there rather than on this 3.X branch

Col-E avatar Jun 16 '24 20:06 Col-E