You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With current version of Jadx API plugins can only add entries to the codearea context menu. Currently it's not possible for plugins to add entries to the tree view on the left side.
Edit method: When I try to replace/edit the method, replace the code in the code cache I'm loosing the usage info. So I can't access the method again using the codearea context menu. With a context menu entry in tree view I might implement a different access path as workaround (I would know the method - I just have to find it in the modified source code.).
Allow plugins to add context menu entries to tree view
Done. New method added to JadxGuiContext:
/** * Add popup menu entry for tree node * * @param name entry title * @param addPredicate check if entry should be added for provided node, called on popup creation */@ApiStatus.ExperimentalvoidaddTreePopupMenuEntry(Stringname, Predicate<ITreeNode> addPredicate, Consumer<ITreeNode> action);
Usage example:
guiContext.addTreePopupMenuEntry("Print class full name",
node -> node.getCodeNodeRef() instanceofClassNode,
node -> System.out.println("Class: " + ((ClassNode) node.getCodeNodeRef()).getFullName())
);
Although, right now I am working on extended jadx-gui API, so this method may be moved to another module later.
Is it possible to access a static block "static {}" via codearea context menu?
Fixed. Now class init method node it is correctly detected (on static keyword), and popup menu entries can be used on it.
Describe your idea
With current version of Jadx API plugins can only add entries to the codearea context menu. Currently it's not possible for plugins to add entries to the tree view on the left side.
My motivation for extending the plugin API
I would like to restore some features of https://github.com/LucasBaizer/apkSpy in my plugin https://github.com/nitram84/jadx-apkspy-plugin which were previously accessible using the tree view context menu:
For all these features I would consider a tree view context menu like in https://github.com/LucasBaizer/apkSpy to be more user friendly.
Is it possible to access a static block "static {}" via codearea context menu? With a tree view context menu this might be possible.
Perhaps extending the context menu of tree view is useful for other plugins too.
The text was updated successfully, but these errors were encountered: