Revert "Replace project_path with project_entry in workspace::{Item, ItemView}"
This reverts commit 9c9a09cccb.
This commit is contained in:
@@ -959,14 +959,6 @@ impl Project {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn path_for_entry(&self, entry: ProjectEntry, cx: &AppContext) -> Option<ProjectPath> {
|
||||
let worktree = self.worktree_for_id(entry.worktree_id, cx)?.read(cx);
|
||||
Some(ProjectPath {
|
||||
worktree_id: entry.worktree_id,
|
||||
path: worktree.entry_for_id(entry.entry_id)?.path.clone(),
|
||||
})
|
||||
}
|
||||
|
||||
pub fn is_running_disk_based_diagnostics(&self) -> bool {
|
||||
self.language_servers_with_diagnostics_running > 0
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
use super::{
|
||||
fs::{self, Fs},
|
||||
ignore::IgnoreStack,
|
||||
DiagnosticSummary, ProjectEntry,
|
||||
DiagnosticSummary,
|
||||
};
|
||||
use ::ignore::gitignore::{Gitignore, GitignoreBuilder};
|
||||
use anyhow::{anyhow, Result};
|
||||
@@ -2202,13 +2202,6 @@ impl File {
|
||||
pub fn worktree_id(&self, cx: &AppContext) -> WorktreeId {
|
||||
self.worktree.read(cx).id()
|
||||
}
|
||||
|
||||
pub fn project_entry(&self, cx: &AppContext) -> Option<ProjectEntry> {
|
||||
self.entry_id.map(|entry_id| ProjectEntry {
|
||||
worktree_id: self.worktree_id(cx),
|
||||
entry_id,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
|
||||
Reference in New Issue
Block a user