rename projectgroup -> project in action name

cameron created

Change summary

crates/sidebar/src/sidebar.rs           | 24 +++++++++++-----------
crates/workspace/src/multi_workspace.rs | 28 +++++++++++++-------------
crates/workspace/src/workspace.rs       |  4 +-
3 files changed, 28 insertions(+), 28 deletions(-)

Detailed changes

crates/sidebar/src/sidebar.rs 🔗

@@ -45,7 +45,7 @@ use util::ResultExt as _;
 use util::path_list::{PathList, SerializedPathList};
 use workspace::{
     AddFolderToProject, CloseWindow, FocusWorkspaceSidebar, MoveWorkspaceToNewWindow,
-    MultiWorkspace, MultiWorkspaceEvent, NextProjectGroup, NextThread, Open, PreviousProjectGroup,
+    MultiWorkspace, MultiWorkspaceEvent, NextProject, NextThread, Open, PreviousProject,
     PreviousThread, ShowFewerThreads, ShowMoreThreads, Sidebar as WorkspaceSidebar, SidebarSide,
     ToggleWorkspaceSidebar, Workspace, WorkspaceId, sidebar_side_context_menu,
 };
@@ -3084,7 +3084,7 @@ impl Sidebar {
         Some(mw.workspace().read(cx).project_group_key(cx))
     }
 
-    fn cycle_project_group_impl(
+    fn cycle_project_impl(
         &mut self,
         forward: bool,
         window: &mut Window,
@@ -3134,22 +3134,22 @@ impl Sidebar {
         }
     }
 
-    fn on_next_project_group(
+    fn on_next_project(
         &mut self,
-        _: &NextProjectGroup,
+        _: &NextProject,
         window: &mut Window,
         cx: &mut Context<Self>,
     ) {
-        self.cycle_project_group_impl(true, window, cx);
+        self.cycle_project_impl(true, window, cx);
     }
 
-    fn on_previous_project_group(
+    fn on_previous_project(
         &mut self,
-        _: &PreviousProjectGroup,
+        _: &PreviousProject,
         window: &mut Window,
         cx: &mut Context<Self>,
     ) {
-        self.cycle_project_group_impl(false, window, cx);
+        self.cycle_project_impl(false, window, cx);
     }
 
     fn cycle_thread_impl(&mut self, forward: bool, window: &mut Window, cx: &mut Context<Self>) {
@@ -3842,8 +3842,8 @@ impl WorkspaceSidebar for Sidebar {
         self.toggle_thread_switcher_impl(select_last, window, cx);
     }
 
-    fn cycle_project_group(&mut self, forward: bool, window: &mut Window, cx: &mut Context<Self>) {
-        self.cycle_project_group_impl(forward, window, cx);
+    fn cycle_project(&mut self, forward: bool, window: &mut Window, cx: &mut Context<Self>) {
+        self.cycle_project_impl(forward, window, cx);
     }
 
     fn cycle_thread(&mut self, forward: bool, window: &mut Window, cx: &mut Context<Self>) {
@@ -3949,8 +3949,8 @@ impl Render for Sidebar {
             .on_action(cx.listener(Self::toggle_archive))
             .on_action(cx.listener(Self::focus_sidebar_filter))
             .on_action(cx.listener(Self::on_toggle_thread_switcher))
-            .on_action(cx.listener(Self::on_next_project_group))
-            .on_action(cx.listener(Self::on_previous_project_group))
+            .on_action(cx.listener(Self::on_next_project))
+            .on_action(cx.listener(Self::on_previous_project))
             .on_action(cx.listener(Self::on_next_thread))
             .on_action(cx.listener(Self::on_previous_thread))
             .on_action(cx.listener(Self::on_show_more_threads))

crates/workspace/src/multi_workspace.rs 🔗

@@ -40,10 +40,10 @@ actions!(
         CloseWorkspaceSidebar,
         /// Moves focus to or from the workspace sidebar without closing it.
         FocusWorkspaceSidebar,
-        /// Activates the next project group in the sidebar.
-        NextProjectGroup,
-        /// Activates the previous project group in the sidebar.
-        PreviousProjectGroup,
+        /// Activates the next project in the sidebar.
+        NextProject,
+        /// Activates the previous project in the sidebar.
+        PreviousProject,
         /// Activates the next thread in sidebar order.
         NextThread,
         /// Activates the previous thread in sidebar order.
@@ -130,7 +130,7 @@ pub trait Sidebar: Focusable + Render + EventEmitter<SidebarEvent> + Sized {
     }
 
     /// Activates the next or previous project group.
-    fn cycle_project_group(
+    fn cycle_project(
         &mut self,
         _forward: bool,
         _window: &mut Window,
@@ -169,7 +169,7 @@ pub trait SidebarHandle: 'static + Send + Sync {
     fn to_any(&self) -> AnyView;
     fn entity_id(&self) -> EntityId;
     fn toggle_thread_switcher(&self, select_last: bool, window: &mut Window, cx: &mut App);
-    fn cycle_project_group(&self, forward: bool, window: &mut Window, cx: &mut App);
+    fn cycle_project(&self, forward: bool, window: &mut Window, cx: &mut App);
     fn cycle_thread(&self, forward: bool, window: &mut Window, cx: &mut App);
     fn move_workspace_to_new_window(&self, window: &mut Window, cx: &mut App);
 
@@ -232,11 +232,11 @@ impl<T: Sidebar> SidebarHandle for Entity<T> {
         });
     }
 
-    fn cycle_project_group(&self, forward: bool, window: &mut Window, cx: &mut App) {
+    fn cycle_project(&self, forward: bool, window: &mut Window, cx: &mut App) {
         let entity = self.clone();
         window.defer(cx, move |window, cx| {
             entity.update(cx, |this, cx| {
-                this.cycle_project_group(forward, window, cx);
+                this.cycle_project(forward, window, cx);
             });
         });
     }
@@ -1514,16 +1514,16 @@ impl Render for MultiWorkspace {
                         },
                     ))
                     .on_action(
-                        cx.listener(|this: &mut Self, _: &NextProjectGroup, window, cx| {
+                        cx.listener(|this: &mut Self, _: &NextProject, window, cx| {
                             if let Some(sidebar) = &this.sidebar {
-                                sidebar.cycle_project_group(true, window, cx);
+                                sidebar.cycle_project(true, window, cx);
                             }
-                        }),
-                    )
+                        },
+                    ))
                     .on_action(cx.listener(
-                        |this: &mut Self, _: &PreviousProjectGroup, window, cx| {
+                        |this: &mut Self, _: &PreviousProject, window, cx| {
                             if let Some(sidebar) = &this.sidebar {
-                                sidebar.cycle_project_group(false, window, cx);
+                                sidebar.cycle_project(false, window, cx);
                             }
                         },
                     ))

crates/workspace/src/workspace.rs 🔗

@@ -32,8 +32,8 @@ pub use crate::notifications::NotificationFrame;
 pub use dock::Panel;
 pub use multi_workspace::{
     CloseWorkspaceSidebar, DraggedSidebar, FocusWorkspaceSidebar, MoveWorkspaceToNewWindow,
-    MultiWorkspace, MultiWorkspaceEvent, NewThread, NextProjectGroup, NextThread,
-    PreviousProjectGroup, PreviousThread, ShowFewerThreads, ShowMoreThreads, Sidebar, SidebarEvent,
+    MultiWorkspace, MultiWorkspaceEvent, NewThread, NextProject, NextThread, PreviousProject,
+    PreviousThread, ShowFewerThreads, ShowMoreThreads, Sidebar, SidebarEvent,
     SidebarHandle, SidebarRenderState, SidebarSide, ToggleWorkspaceSidebar,
     sidebar_side_context_menu,
 };