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/warp/src/plugin/commit.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins/warp/src/plugin/commit.rs') diff --git a/plugins/warp/src/plugin/commit.rs b/plugins/warp/src/plugin/commit.rs index d98a356a..4e8a9fee 100644 --- a/plugins/warp/src/plugin/commit.rs +++ b/plugins/warp/src/plugin/commit.rs @@ -3,8 +3,7 @@ use crate::cache::container::cached_containers; use crate::container::{SourceId, SourcePath}; use crate::plugin::create::OpenFileField; -use binaryninja::binary_view::BinaryView; -use binaryninja::command::Command; +use binaryninja::command::GlobalCommand; use binaryninja::interaction::{Form, FormInputField}; use warp::chunk::ChunkKind; use warp::WarpFile; @@ -137,14 +136,14 @@ impl CommitFile { } } -impl Command for CommitFile { - fn action(&self, _view: &BinaryView) { +impl GlobalCommand for CommitFile { + fn action(&self) { std::thread::spawn(move || { Self::execute(); }); } - fn valid(&self, _view: &BinaryView) -> bool { + fn valid(&self) -> bool { true } } -- cgit v1.3.1