use super::populate_call_hierarchy::populate_call_hierarchy;
use super::populate_defs_refs::{populate_definitions, populate_references};
use super::populate_hover_diag::{populate_diagnostics, populate_hovers};
use super::populate_type_hierarchy::populate_type_hierarchy;
use super::types::MaterializedViewStore;
use oxigraph::store::Store;
#[allow(clippy::mutable_key_type)]
pub fn update_views(store: &Store, views: &MaterializedViewStore) {
views.clear();
populate_definitions(store, views);
populate_references(store, views);
populate_hovers(store, views);
populate_diagnostics(store, views);
populate_call_hierarchy(store, views);
populate_type_hierarchy(store, views);
let committed = views
.committed_epoch
.load(std::sync::atomic::Ordering::Acquire);
views
.applied_epoch
.store(committed, std::sync::atomic::Ordering::Release);
let _lock = views.sync_mutex.lock().unwrap();
views.sync_condvar.notify_all();
}