diff --git a/crates/editor/src/code_context_menus.rs b/crates/editor/src/code_context_menus.rs index 8fbae8d6052d89299b10f3cd0c971af79abd3c90..e7403edf8af60fb38f373b4999cb86145a125dd5 100644 --- a/crates/editor/src/code_context_menus.rs +++ b/crates/editor/src/code_context_menus.rs @@ -1438,6 +1438,29 @@ impl CodeActionsMenu { .overflow_hidden() .child("debug: ") .child(scenario.label.clone()) + .child( + IconButton::new( + SharedString::new(format!("edit-{ix}")), + IconName::Pencil, + ) + .on_click(cx.listener( + move |editor, _, window, cx| { + cx.stop_propagation(); + if let Some(workspace) = editor.workspace() + { + workspace.update(cx, |this, cx| { + // if let Some(panel) = this.panel::(cx) { + // let kind = todo!(); + // let id = todo!(); + // panel.update_in(cx, |panel, window, cx| { + // panel.go_to_scenario_definition(kind, scenario, id, window, cx) + // })? + // } + }) + } + }, + )), + ) .when(selected, |this| { this.text_color(colors.text_accent) }), diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 014583912fd3233d3bc1872188a15679d766ff2b..3076c00d16eddd664f0de8cbeabb871a5de158d9 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -2836,7 +2836,6 @@ impl EditorElement { ) -> Vec { self.editor.update(cx, |editor, cx| { let active_task_indicator_row = - // TODO: add edit button on the right side of each row in the context menu if let Some(crate::CodeContextMenu::CodeActions(CodeActionsMenu { deployed_from, actions,