Initial commit
This commit is contained in:
parent
125b89d8da
commit
dcfaed0182
26 changed files with 2080 additions and 143 deletions
|
|
@ -1980,7 +1980,7 @@ impl OpenCADStudio {
|
|||
// their ribbon tabs into the ribbon. Skipped under test/wasm.
|
||||
#[cfg(all(not(target_arch = "wasm32"), not(test)))]
|
||||
{
|
||||
for (id, res) in crate::plugin::external::load_at_startup() {
|
||||
for (id, res) in crate::plugin::external::load_at_startup(&mut app) {
|
||||
if let Err(e) = res {
|
||||
app.command_line
|
||||
.push_error(&format!("Plugin '{id}' failed to load: {e}"));
|
||||
|
|
@ -2000,6 +2000,22 @@ impl OpenCADStudio {
|
|||
Self::new()
|
||||
}
|
||||
|
||||
/// Install `cmd` as the active interactive command for tab `tab`.
|
||||
pub(crate) fn set_active_command(
|
||||
&mut self,
|
||||
tab: usize,
|
||||
cmd: Box<dyn crate::command::CadCommand>,
|
||||
) {
|
||||
if let Some(t) = self.tabs.get_mut(tab) {
|
||||
t.active_cmd = Some(cmd);
|
||||
}
|
||||
}
|
||||
|
||||
/// Push an error message from the plugin runtime to the command line.
|
||||
pub(crate) fn push_plugin_error(&mut self, msg: &str) {
|
||||
self.command_line.push_error(msg);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub(crate) fn command_history_info(&self) -> Vec<String> {
|
||||
use crate::ui::command_line::EntryKind;
|
||||
|
|
|
|||
Loading…
Reference in a new issue