File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 37
37
from . import highlevelil
38
38
39
39
40
- class PluginCommandContext :
40
+ class PluginCommandContext : """
41
+ The ``class PluginCommandContext`` is used to access loaded plugins and their exposed methods with the context of a specific Binary VIew.
42
+
43
+ :Example:
44
+ # To trigger a registered plugin with a BinaryView, for example:
45
+ >>> bv = load("/tmp/file1")
46
+ >>> ctx = PluginCommandContext(bv);
47
+ >>> binexport = PluginCommand.get_valid_list(ctx)["BinExport"]
48
+ >>> binexport.execute(ctx)
49
+ """
50
+
41
51
def __init__ (self , view ):
42
52
self ._view = view
43
53
self ._address = 0
@@ -834,7 +844,7 @@ def is_valid(self, context):
834
844
835
845
def execute (self , context ):
836
846
r"""
837
- ``execute`` Execute a Plugin
847
+ ``execute`` Execute a plugin. See the example in :class:`~PluginCommandContext`
838
848
839
849
:param str context: PluginCommandContext to pass the PluginCommand
840
850
:rtype: None
You can’t perform that action at this time.
0 commit comments