Get editor tests compiling
This commit is contained in:
parent
4c5d5105f3
commit
0e3fd92bd0
8 changed files with 1618 additions and 1426 deletions
|
@ -4200,24 +4200,24 @@ impl ViewId {
|
|||
}
|
||||
}
|
||||
|
||||
// pub trait WorkspaceHandle {
|
||||
// fn file_project_paths(&self, cx: &AppContext) -> Vec<ProjectPath>;
|
||||
// }
|
||||
pub trait WorkspaceHandle {
|
||||
fn file_project_paths(&self, cx: &AppContext) -> Vec<ProjectPath>;
|
||||
}
|
||||
|
||||
// impl WorkspaceHandle for View<Workspace> {
|
||||
// fn file_project_paths(&self, cx: &AppContext) -> Vec<ProjectPath> {
|
||||
// self.read(cx)
|
||||
// .worktrees(cx)
|
||||
// .flat_map(|worktree| {
|
||||
// let worktree_id = worktree.read(cx).id();
|
||||
// worktree.read(cx).files(true, 0).map(move |f| ProjectPath {
|
||||
// worktree_id,
|
||||
// path: f.path.clone(),
|
||||
// })
|
||||
// })
|
||||
// .collect::<Vec<_>>()
|
||||
// }
|
||||
// }
|
||||
impl WorkspaceHandle for View<Workspace> {
|
||||
fn file_project_paths(&self, cx: &AppContext) -> Vec<ProjectPath> {
|
||||
self.read(cx)
|
||||
.worktrees(cx)
|
||||
.flat_map(|worktree| {
|
||||
let worktree_id = worktree.read(cx).id();
|
||||
worktree.read(cx).files(true, 0).map(move |f| ProjectPath {
|
||||
worktree_id,
|
||||
path: f.path.clone(),
|
||||
})
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
}
|
||||
}
|
||||
|
||||
// impl std::fmt::Debug for OpenPaths {
|
||||
// fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue