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/create.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/bntl_utils/src/command/create.rs') diff --git a/plugins/bntl_utils/src/command/create.rs b/plugins/bntl_utils/src/command/create.rs index 5fa8c2be..96d0eb60 100644 --- a/plugins/bntl_utils/src/command/create.rs +++ b/plugins/bntl_utils/src/command/create.rs @@ -3,7 +3,7 @@ use crate::process::{new_processing_state_background_thread, TypeLibProcessor}; use crate::validate::TypeLibValidater; use binaryninja::background_task::BackgroundTask; use binaryninja::binary_view::{BinaryView, BinaryViewExt}; -use binaryninja::command::{Command, ProjectCommand}; +use binaryninja::command::{Command, GlobalCommand, ProjectCommand}; use binaryninja::interaction::{Form, FormInputField, MessageBoxButtonSet, MessageBoxIcon}; use binaryninja::platform::Platform; use binaryninja::project::Project; @@ -188,14 +188,14 @@ impl CreateFromDirectory { } } -impl Command for CreateFromDirectory { - fn action(&self, _view: &BinaryView) { +impl GlobalCommand for CreateFromDirectory { + fn action(&self) { thread::spawn(move || { CreateFromDirectory::execute(); }); } - fn valid(&self, _view: &BinaryView) -> bool { + fn valid(&self) -> bool { true } } -- cgit v1.3.1