forked from 1b-agent/opencadstudio-upstream
Minimal in-tree add-on (DP_HELLO) validates registry, ribbon merge, and try_dispatch. Five new lib tests; EntryKind gains PartialEq for test helpers.
21 lines
516 B
Rust
21 lines
516 B
Rust
use crate::plugin::host::{BuiltinPlugin, HostSession};
|
|
use crate::plugin::manifest::PluginManifest;
|
|
|
|
use super::dispatch;
|
|
use super::manifest;
|
|
|
|
pub struct DemoPlugin;
|
|
|
|
impl BuiltinPlugin for DemoPlugin {
|
|
fn manifest(&self) -> &'static PluginManifest {
|
|
&manifest::MANIFEST
|
|
}
|
|
|
|
fn ribbon(&self) -> Box<dyn crate::modules::CadModule> {
|
|
Box::new(super::DemoPluginModule)
|
|
}
|
|
|
|
fn dispatch(&self, host: &mut HostSession<'_>, cmd: &str) -> bool {
|
|
dispatch::handle(host, cmd)
|
|
}
|
|
} |