MCPcopy Index your code
hub / github.com/encounter/objdiff / object_context_ui

Function object_context_ui

objdiff-gui/src/views/config.rs:376–389  ·  view source on GitHub ↗
(ui: &mut egui::Ui, object: &ObjectConfig)

Source from the content-addressed store, hash-verified

374}
375
376fn object_context_ui(ui: &mut egui::Ui, object: &ObjectConfig) {
377 if let Some(source_path) = &object.source_path
378 && ui
379 .button("Open source file")
380 .on_hover_text("Open the source file in the default editor")
381 .clicked()
382 {
383 log::info!("Opening file {source_path}");
384 if let Err(e) = open::that_detached(source_path.as_str()) {
385 log::error!("Failed to open source file: {e}");
386 }
387 ui.close();
388 }
389}
390
391#[derive(Default, Copy, Clone, PartialEq, Eq, Debug)]
392enum NodeOpen {

Callers 1

display_unitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected