Make workspace items expose their underlying models, remove file-related methods

This commit is contained in:
Max Brunsfeld 2023-01-17 17:21:06 -08:00
parent 292708573f
commit 8651320c9f
11 changed files with 198 additions and 196 deletions

View file

@ -15,7 +15,6 @@ use gpui::{
use menu::Confirm;
use project::{search::SearchQuery, Project};
use settings::Settings;
use smallvec::SmallVec;
use std::{
any::{Any, TypeId},
ops::Range,
@ -264,12 +263,8 @@ impl Item for ProjectSearchView {
.boxed()
}
fn project_path(&self, _: &gpui::AppContext) -> Option<project::ProjectPath> {
None
}
fn project_entry_ids(&self, cx: &AppContext) -> SmallVec<[project::ProjectEntryId; 3]> {
self.results_editor.project_entry_ids(cx)
fn for_each_project_item(&self, cx: &AppContext, f: &mut dyn FnMut(usize, &dyn project::Item)) {
self.results_editor.for_each_project_item(cx, f)
}
fn is_singleton(&self, _: &AppContext) -> bool {