Interface JadxGuiContext


public interface JadxGuiContext
  • Method Details

    • uiRun

      void uiRun(Runnable runnable)
      Run code in UI Thread
    • addMenuAction

      void addMenuAction(String name, Runnable action)
      Add global menu entry ('Plugins' section)
    • addPopupMenuAction

      void addPopupMenuAction(String name, @Nullable @Nullable Function<ICodeNodeRef,Boolean> enabled, @Nullable @Nullable String keyBinding, Consumer<ICodeNodeRef> action)
      Add code viewer popup menu entry
      Parameters:
      name - entry title
      enabled - check if entry should be enabled, called on popup creation
      keyBinding - optional assigned keybinding KeyStroke.getKeyStroke(String)
    • addTreePopupMenuEntry

      @Experimental void addTreePopupMenuEntry(String name, Predicate<ITreeNode> addPredicate, Consumer<ITreeNode> action)
      Add popup menu entry for tree node
      Parameters:
      name - entry title
      addPredicate - check if entry should be added for provided node, called on popup creation
    • registerGlobalKeyBinding

      boolean registerGlobalKeyBinding(String id, String keyBinding, Runnable action)
      Attach new key binding to main window
      Parameters:
      id - unique ID string
      keyBinding - keybinding string KeyStroke.getKeyStroke(String)
      action - runnable action
      Returns:
      false if already registered
    • copyToClipboard

      void copyToClipboard(String str)
    • settings

      JadxGuiSettings settings()
      Access to GUI settings
    • getMainFrame

      JFrame getMainFrame()
      Main window component. Can be used as a parent for creating new windows or dialogs.
    • getSVGIcon

      ImageIcon getSVGIcon(String name)
      Load SVG icon from jadx resources. All available icons can be found in "jadx-gui/src/main/resources/icons". Method is thread-safe.
      Parameters:
      name - short name in form: "category/iconName", example: "nodes/publicClass"
      Returns:
      loaded and cached icon, if icon not found returns default icon: "ui/error"
    • getNodeUnderCaret

      ICodeNodeRef getNodeUnderCaret()
    • getNodeUnderMouse

      ICodeNodeRef getNodeUnderMouse()
    • getEnclosingNodeUnderCaret

      ICodeNodeRef getEnclosingNodeUnderCaret()
    • getEnclosingNodeUnderMouse

      ICodeNodeRef getEnclosingNodeUnderMouse()
    • open

      boolean open(ICodeNodeRef ref)
      Jump to a code ref
      Returns:
      if successfully jumped to the code ref
    • openUsageDialog

      void openUsageDialog(ICodeNodeRef ref)
      Open usage dialog for a node
    • reloadActiveTab

      void reloadActiveTab()
      Reload code in active tab
    • reloadAllTabs

      void reloadAllTabs()
      Reload code in all open tabs
    • applyNodeRename

      void applyNodeRename(ICodeNodeRef node)
      Save node rename in a project and run all needed UI updates