Remove cx param
This commit is contained in:
@@ -3640,7 +3640,6 @@ impl Editor {
|
||||
}
|
||||
|
||||
pub fn toggle_code_actions(&mut self, action: &ToggleCodeActions, cx: &mut ViewContext<Self>) {
|
||||
dbg!("TOGGLE CODE ACTIONS");
|
||||
let mut context_menu = self.context_menu.write();
|
||||
if matches!(context_menu.as_ref(), Some(ContextMenu::CodeActions(_))) {
|
||||
*context_menu = None;
|
||||
|
||||
@@ -37,19 +37,18 @@ pub fn deploy_context_menu(
|
||||
});
|
||||
|
||||
let context_menu = ui::ContextMenu::build(cx, |menu, cx| {
|
||||
menu.action("Rename Symbol", Box::new(Rename), cx)
|
||||
.action("Go to Definition", Box::new(GoToDefinition), cx)
|
||||
.action("Go to Type Definition", Box::new(GoToTypeDefinition), cx)
|
||||
.action("Find All References", Box::new(FindAllReferences), cx)
|
||||
menu.action("Rename Symbol", Box::new(Rename))
|
||||
.action("Go to Definition", Box::new(GoToDefinition))
|
||||
.action("Go to Type Definition", Box::new(GoToTypeDefinition))
|
||||
.action("Find All References", Box::new(FindAllReferences))
|
||||
.action(
|
||||
"Code Actions",
|
||||
Box::new(ToggleCodeActions {
|
||||
deployed_from_indicator: false,
|
||||
}),
|
||||
cx,
|
||||
)
|
||||
.separator()
|
||||
.action("Reveal in Finder", Box::new(RevealInFinder), cx)
|
||||
.action("Reveal in Finder", Box::new(RevealInFinder))
|
||||
});
|
||||
let context_menu_focus = context_menu.focus_handle(cx);
|
||||
cx.focus(&context_menu_focus);
|
||||
|
||||
Reference in New Issue
Block a user