aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/lib.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-03-05 11:42:04 +0000
committerAleksey Kladov <[email protected]>2020-03-05 12:40:53 +0000
commitfc970d188e9eeca02bc189bbcc0082a0bbf13a57 (patch)
tree304421ba00a3172c94f05b470e2d16c9ffbab1f4 /crates/ra_ide/src/lib.rs
parent94c48980bbe51777c52b1d6154181c875f944616 (diff)
Prime open files on load
Diffstat (limited to 'crates/ra_ide/src/lib.rs')
-rw-r--r--crates/ra_ide/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs
index 5a41f702e..4dfe0553e 100644
--- a/crates/ra_ide/src/lib.rs
+++ b/crates/ra_ide/src/lib.rs
@@ -13,6 +13,7 @@
13pub mod mock_analysis; 13pub mod mock_analysis;
14mod source_change; 14mod source_change;
15 15
16mod prime_caches;
16mod status; 17mod status;
17mod completion; 18mod completion;
18mod runnables; 19mod runnables;
@@ -227,6 +228,10 @@ impl Analysis {
227 self.with_db(|db| status::status(&*db)) 228 self.with_db(|db| status::status(&*db))
228 } 229 }
229 230
231 pub fn prime_caches(&self, files: Vec<FileId>) -> Cancelable<()> {
232 self.with_db(|db| prime_caches::prime_caches(db, files))
233 }
234
230 /// Gets the text of the source file. 235 /// Gets the text of the source file.
231 pub fn file_text(&self, file_id: FileId) -> Cancelable<Arc<String>> { 236 pub fn file_text(&self, file_id: FileId) -> Cancelable<Arc<String>> {
232 self.with_db(|db| db.file_text(file_id)) 237 self.with_db(|db| db.file_text(file_id))