(
ui: &mut egui::Ui,
obj: &Object,
symbol_idx: usize,
ins_ref: InstructionRef,
diff_config: &DiffObjConfig,
appearance: &Appearance,
)
| 72 | } |
| 73 | |
| 74 | fn ins_hover_ui( |
| 75 | ui: &mut egui::Ui, |
| 76 | obj: &Object, |
| 77 | symbol_idx: usize, |
| 78 | ins_ref: InstructionRef, |
| 79 | diff_config: &DiffObjConfig, |
| 80 | appearance: &Appearance, |
| 81 | ) { |
| 82 | let Some(resolved) = obj.resolve_instruction_ref(symbol_idx, ins_ref) else { |
| 83 | ui.colored_label(appearance.delete_color, "Failed to resolve instruction"); |
| 84 | return; |
| 85 | }; |
| 86 | let ins = match obj.arch.process_instruction(resolved, diff_config) { |
| 87 | Ok(ins) => ins, |
| 88 | Err(e) => { |
| 89 | ui.colored_label( |
| 90 | appearance.delete_color, |
| 91 | format!("Failed to process instruction: {e}"), |
| 92 | ); |
| 93 | return; |
| 94 | } |
| 95 | }; |
| 96 | |
| 97 | ui.scope(|ui| { |
| 98 | ui.style_mut().override_text_style = Some(egui::TextStyle::Monospace); |
| 99 | ui.style_mut().wrap_mode = Some(egui::TextWrapMode::Wrap); |
| 100 | hover_items_ui(ui, instruction_hover(obj, resolved, &ins, diff_config), appearance); |
| 101 | }); |
| 102 | } |
| 103 | |
| 104 | fn ins_context_menu( |
| 105 | ui: &mut egui::Ui, |
no test coverage detected