Introduce workspace::Item::reload to manually trigger a reload

This commit is contained in:
Antonio Scandurra 2022-04-01 14:02:49 +02:00
parent 65048760b2
commit 703f1c3be0
4 changed files with 57 additions and 0 deletions

View file

@ -478,6 +478,14 @@ impl workspace::Item for ProjectDiagnosticsEditor {
self.editor.save(project, cx)
}
fn reload(
&mut self,
project: ModelHandle<Project>,
cx: &mut ViewContext<Self>,
) -> Task<Result<()>> {
self.editor.reload(project, cx)
}
fn can_save_as(&self, _: &AppContext) -> bool {
false
}