mirror of
https://github.com/latex-lsp/texlab.git
synced 2025-08-04 02:39:21 +00:00
Move DocumentView to workspace crate
This commit is contained in:
parent
e201b39d85
commit
d29b8e8696
4 changed files with 21 additions and 22 deletions
|
@ -127,6 +127,24 @@ impl Workspace {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Eq, Clone)]
|
||||
pub struct DocumentView {
|
||||
pub workspace: Arc<Workspace>,
|
||||
pub document: Arc<Document>,
|
||||
pub related_documents: Vec<Arc<Document>>,
|
||||
}
|
||||
|
||||
impl DocumentView {
|
||||
pub fn new(workspace: Arc<Workspace>, document: Arc<Document>) -> Self {
|
||||
let related_documents = workspace.related_documents(&document.uri);
|
||||
Self {
|
||||
workspace,
|
||||
document,
|
||||
related_documents,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct WorkspaceManager {
|
||||
workspace: Mutex<Arc<Workspace>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue