feat(plugins): add method to get jadx-gui icons by name

This commit is contained in:
Skylot
2025-01-20 17:13:23 +00:00
parent 6860a8be7e
commit 45d320a596
3 changed files with 38 additions and 0 deletions
@@ -3,6 +3,7 @@ package jadx.api.plugins.gui;
import java.util.function.Consumer;
import java.util.function.Function;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.KeyStroke;
@@ -57,6 +58,16 @@ public interface JadxGuiContext {
*/
JFrame getMainFrame();
/**
* Load SVG icon from jadx resources.
* All available icons can be found in "jadx-gui/src/main/resources/icons".
* Method is thread-safe.
*
* @param name short name in form: "category/iconName", example: "nodes/publicClass"
* @return loaded and cached icon, if icon not found returns default icon: "ui/error"
*/
ImageIcon getSVGIcon(String name);
ICodeNodeRef getNodeUnderCaret();
ICodeNodeRef getNodeUnderMouse();