From d0eec62d6df0edbbb76dfeac58879797e90a8594 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sun, 22 Feb 2026 22:42:35 -0800 Subject: Add global plugin command type Register plugins which are available outside the context of a binary view --- plugins/bntl_utils/src/command/validate.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/bntl_utils/src/command/validate.rs') diff --git a/plugins/bntl_utils/src/command/validate.rs b/plugins/bntl_utils/src/command/validate.rs index b95699e0..921309fd 100644 --- a/plugins/bntl_utils/src/command/validate.rs +++ b/plugins/bntl_utils/src/command/validate.rs @@ -1,8 +1,7 @@ use crate::command::{InputDirectoryField, OutputDirectoryField}; use crate::helper::path_to_type_libraries; use crate::validate::TypeLibValidater; -use binaryninja::binary_view::BinaryView; -use binaryninja::command::Command; +use binaryninja::command::GlobalCommand; use binaryninja::interaction::Form; use binaryninja::platform::Platform; @@ -68,14 +67,14 @@ impl Validate { } } -impl Command for Validate { - fn action(&self, _view: &BinaryView) { +impl GlobalCommand for Validate { + fn action(&self) { std::thread::spawn(move || { Validate::execute(); }); } - fn valid(&self, _view: &BinaryView) -> bool { + fn valid(&self) -> bool { true } } -- cgit v1.3.1