-
I have the selected (or highlighted?) token (type, variable, constant, etc) under the cursor after clicking. How can I get a type or a position or a name of the token? For example:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You'll want to use a UI plugin for this. You'll receive a UIContext object that will contain information like the view, selection, etc. snippets is one example plugin that does this but there are others. https://github.com/Vector35/snippets/blob/master/__init__.py note that this module isn't documented the normal way because it's exposed via PySide. https://api.binary.ninja/cpp/class_u_i_context.html In short, look for example plugins using the registerNotification API |
Beta Was this translation helpful? Give feedback.
You'll want to use a UI plugin for this. You'll receive a UIContext object that will contain information like the view, selection, etc. snippets is one example plugin that does this but there are others.
https://github.com/Vector35/snippets/blob/master/__init__.py
(See specifically, the uses of the UIAction module)
note that this module isn't documented the normal way because it's exposed via PySide.
https://api.binary.ninja/cpp/class_u_i_context.html
In short, look for example plugins using the registerNotification API