def hxe_callback(self, event, *args):
"""
HexRays event callback.
We lump this under the (UI) Hooks class for organizational reasons.
"""
#
# if the event callback indicates that this is a popup menu event
# (in the hexrays window), we may want to install our prefix menu
# actions depending on what the cursor right clicked.
#
if event == idaapi.hxe_populating_popup:
form, popup, vu = args
#
# if the user cursor isn't hovering over a function ref, there
# is nothing for us to do
#
if get_cursor_func_ref() == idaapi.BADADDR:
return 0
#
# the user cursor is hovering over a valid target for a recursive
# function prefix. insert the prefix action entry into the menu
#
idaapi.attach_action_to_popup(
form,
popup,
prefix_t.ACTION_RECURSIVE,
"Rename global item",
idaapi.SETMENU_APP
)
# done
return 0
#------------------------------------------------------------------------------
# Prefix Wrappers
#------------------------------------------------------------------------------
评论列表
文章目录